package cn.jervain.nut.auth.core.util;

public final class Assert {

    public static void isTrue(boolean expression, String message) {
        if (!expression) {
            if (message == null) {
                throw new RuntimeException();
            } else {
                throw new RuntimeException(message);
            }
        }
    }

    public static void notNull(Object object, String message) {
        isTrue(object != null, message);
    }

    public static void notNull(Object object) {
        notNull(object, null);
    }

}
